
out vec3 FragmentNormal;
out vec3 FragmentPosition;
in vec3 VertexPosition;
in vec3 VertexNormal;
uniform mat4 projection_matrix;
uniform mat4 modelview_matrix;
uniform mat3 m_3x3_inv_transp;
uniform vec3 color;
uniform float FocalDistance;

void main(void)
{
	gl_Position = projection_matrix * modelview_matrix * vec4(VertexPosition, 1.0) ;

	FragmentPosition = (modelview_matrix * vec4(VertexPosition, 1.0)).xyz;
    mat4 newMatrix = modelview_matrix;
    newMatrix[0].w =0.0;
    newMatrix[1].w =0.0;
    newMatrix[2].w =0.0;
    newMatrix[3].w =1.0;

	vec3 OutNormal = m_3x3_inv_transp * VertexNormal;
	FragmentNormal = normalize(OutNormal.xyz);

}
